#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

vector<int> ff(int x)
{
	vector<int> v;
	while (x)
	{
		int tmp = x%10;
		v.push_back(tmp);
		x = x / 10;
	}
	reverse(v.begin(), v.end());
	return v;
}

int main()
{
	 vector<int> v = ff(111);
	for (auto ch : v)
	{
		cout << ch << " ";
	}

	return 0;
}
